package org.marketlive.entity.account;

import org.marketlive.entity.IEntityHome;


/*
(C) Copyright MarketLive. 2006. All rights reserved.
MarketLive is a trademark of MarketLive, Inc.
Warning: This computer program is protected by copyright law and international treaties.
Unauthorized reproduction or distribution of this program, or any portion of it, may result
in severe civil and criminal penalties, and will be prosecuted to the maximum extent
possible under the law.
*/

/**
 * Interface to the Home object of the Hint entity, which holds password recovery hint questions.
 */
public interface IHintHome extends IEntityHome {

    /**
     * Creates a Hint given the input question.
     * 
     * @return IHint created from the input parameter
     */
    IHint create();
    
    /**
     * Returns the {@link IHint} with the given code. Code must be unique across all entity instances.
     * An <code>IllegalArgumentException</code> will be thrown if more than one entity with the given code
     * have been found.   
     *
     * @param code the code to search on.
     * @return an instance of <code>IHint</code> if one is found for the given code, null otherwise.
     */
    IHint findByCode(final String code);

}
